package com.yequan;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author yq
 * @date 2020/08/07
 */
public class Regex {

    public static void main(String[] args) {
        //提取字符串末尾的数字：封妖塔守卫71 == >> 71
        String reg = "\\D+(\\d+)$";
        String s = "\\case\\10024071\\bpast\\10000200";
        Pattern p2 = Pattern.compile(reg);
        Matcher m2 = p2.matcher(s);
        if(m2.find()){
            // 组提取字符串c
            System.out.println(m2.group(1));
        }
    }

}
